package com.scap.dfs.service.impl;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.apache.log4j.Logger;
import org.hibernate.ObjectDeletedException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.scap.dfs.dao.DailyCalFormulaConfigDao;
import com.scap.dfs.dao.DailyCalFormulaDao;
import com.scap.dfs.dao.TrnDailyDao;
import com.scap.dfs.dao.impl.DailyCalFormulaConfigDaoImpl;
import com.scap.dfs.model.DailyCalFormula;
import com.scap.dfs.model.DailyCalFormulaConfig;
import com.scap.dfs.model.TrnDaily;
import com.scap.dfs.service.TrnDailyProcessService;

@Service
public class TrnDailyProcessServiceImpl implements TrnDailyProcessService {

	
	
	final static Logger logger = Logger.getLogger(TrnDailyProcessServiceImpl.class);
	
	@Autowired
	TrnDailyDao trnDailyDao;
	
	@Autowired
	DailyCalFormulaDao calFormulaDao;
	
	@Autowired
	DailyCalFormulaConfigDao configCalDao;
	

	@Transactional
	@Override
	public String rollbackBasicAllocate(String hospitalCode, String beginDate,
			String endDate,String userId) {
		return trnDailyDao.rollbackBasicAllocate(hospitalCode, beginDate, endDate, userId);
	}


	@Transactional
	@Override
	public int countGetList(String hospitalCode, String beginDate,
			String endDate) {
		return trnDailyDao.countGetList(hospitalCode, beginDate, endDate);
	}


	@Transactional
	@Override
	public String updateTrnDailyForBasicAllocateProcess(TrnDaily trnDaily) {
		return trnDailyDao.updateTrnDailyForBasicAllocateProcess(trnDaily);
	}

	

}
